# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=ruby-rubyzip
_gemname=rubyzip
pkgver=2.4.1
pkgrel=2
pkgdesc='A ruby module for reading and writing zip files.'
arch=('any')
url='http://rubyzip.sourceforge.net/'
license=('BSD')
depends=('ruby')
makedepends=('rubygems' 'ruby-rdoc')
source=("https://rubygems.org/gems/$_pkgname-$pkgver.gem")
sha512sums=('113a1d8913826d6f96f6d7bdaee49bb9dbc5a5ff01054f93467a377ab3b890c782d42a2ed466d17385868350079345aada87541ba7617e28a4af700d17aab9ef')
noextract=("$_gemname-$pkgver.gem")

package() {
  _gemdir="$(ruby -e'puts Gem.default_dir')"

  if [[ $CARCH == arm* ]] ; then
    gem install --no-user-install --ignore-dependencies --no-rdoc --no-ri \
      -i "$pkgdir$_gemdir" "$_gemname-$pkgver.gem"
  else
    gem install --no-user-install --ignore-dependencies -i "$pkgdir$_gemdir" \
      "$_gemname-$pkgver.gem"
  fi
}

